
import base from './base'
import form from './form'
import table from './table'
import custormStyleShow from './custormStyleShow'
import custormStyleEdit from './custormStyleEdit'
import custormPosterShow from './custormPosterShow'
import custormPosterEdit from './custormPosterEdit'
export default {
  mixins: [
    {
      scopeMap: ['Upload', 'BaiduMap', 'ShareLink', 'MultipleSpecifications', 'DragHotspots', 'DeliveryArea', 'ExportFileIn', 'AMap', 'UploadCropper', 'ChooseUser', 'ChooseUeditorSource', 'MagicSquare', 'CitySelect', 'ChooseFiles', 'ChooseGoods', 'ChooseCoupon', 'ChooseSms', 'ChooseLink'],
      state: base
    },
    {
      scopeMap: ['CustormStyleShow'],
      state: custormStyleShow
    },
    {
      scopeMap: ['CustormStyleEdit'],
      state: custormStyleEdit
    },
    {
      scopeMap: ['CustormPosterShow'],
      state: custormPosterShow
    },
    {
      scopeMap: ['CustormPosterEdit'],
      state: custormPosterEdit
    },
    {
      scopeMap: ['Form'],
      state: form
    },
    {
      scopeMap: ['Table'],
      state: table
    }
  ],
  getters(scope) {
    const _this = this
    let result = {}
    _this.mixins.some(item => {
      const inScope = item.scopeMap.includes(scope)
      if (inScope) {
        result = item.state
        return inScope
      }
    })
    return result
  }
}
